<h3>BUCH verkaufen</h3>
<form action="Index?action=sell_book" method="POST">
	<FIELDSET>
    <LEGEND ACCESSKEY=I>Informationen</LEGEND>
	<table>		
		<tr>
			<td width="120">Titel :</td>
			<td>
				<input type="text" name="title" size="70" maxlength="70" />
			</td>
		</tr>
		<tr>
			<td>Autor:</td>
			<td>
				<input type="text" name="author" size="70"	maxlength="70" />
			</td>
		</tr>
		<tr>
			<td>Erscheinungsjahr:</td>
			<td>
				<input type="text" name="year" size="10" maxlength="10" />
			</td>
		</tr>
		<tr>
			<td>Verlag:</td>
			<td>
				<input type="text" name="publisher" size="70" maxlength="70" />
			</td>
		</tr>
		<tr>
			<td>Seitenanzahl:</td>
			<td>
				<input type="text" name="pages" size="10" maxlength="10" />
			</td>
		</tr>
		<tr>
			<td>Thema:</td>
			<td>
				<input type="text" name="genre" size="70" maxlength="70" />
			</td>
		</tr>
		<tr>
			<td>Beschreibung:</td>
			<td>
				<textarea name="description" rows="10" cols="50"></textarea>
			</td>
		</tr>
	</table>
	</fieldset>
	<FIELDSET>
    <LEGEND ACCESSKEY=I>Auktion</LEGEND>
	<table>
		<tr>
			<td>Preis:</td>
			<td>
				<input type="text" name="price" size="10" maxlength="10" />
			</td>
		</tr>
		<tr>
			<td>Art:</td>
			<td>
				<select id="auctionType" name="auctionType" onchange="checkAuction()">					
					<option value="SELL">Verkauf</option>
					<option value="AUCTION">Auktion</option>
				</select>
			</td>
		</tr>
		<tr id="auction_dates">
			<td>Dauer:</td>
			<td>
				<select name="auctionDuration">					
					<option value="3">3</option>
					<option value="5">5</option>
					<option value="10">10</option>
				</select>
				Tage
			</td>
		</tr>
		<tr>
			<td>
				<input type="submit" value="Jetzt Verkaufen" />
			</td>
		</tr>
	</table>
	</FIELDSET>
</form>
<script type="text/javascript">
	var select = document.getElementById("auctionType");
	var auction_dates = document.getElementById("auction_dates");
	
	auction_dates.style.display = 'none';

	function checkAuction(){	
		if(select.selectedIndex == 1){
			if(auction_dates.style.display == 'none'){
				auction_dates.style.display = '';
			}
		}else{
			if(auction_dates.style.display == ''){
				auction_dates.style.display = 'none';
			}
		}
	}
</script>